package com.itheima.dao;

import com.itheima.domain.Test;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface TestDao {
    // 根据id查询文章信息
    @Select("select * from test where id = #{id}")
    public Test getById(Integer id);


    @Insert("INSERT INTO test(id,type,name,description)values(#{id},#{type},#{name},#{description})")
    public Test  G(Test test);

    @Delete("delete  from test where id = #{id}")
    public Test deleteId(Integer id);



}
